import { GoodsItem } from "./GoodsItem";
import { ObjCreate } from "./ObjCreate";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { ResFileConst } from "../../resource/ResFileConst";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../resource/ImagesConst";
type int = number;
//class PlayerEquipItem
    
    export  class PlayerEquipItem extends GoodsItem
    {
        constructor()
        {
            super();
            return;
        }

        public get category(): int
        {
            return this._category;
        }

        public get type(): int
        {
            return this._type;
        }

        public setEquipmentBg(arg1: int, arg2: int): void
        {
            this._category = arg1;
            this._type = arg2;
            if (this._equipmentBg == null) 
            {
                this._equipmentBg = ObjCreate.createBitmap(null, -3, -3);
                addChildAt(this._equipmentBg, 0);
            }
            LoaderHelp.addResCallBack(ResFileConst.equipmentBg, this.onResLoaded);
            return;
        }

        /* internal  */onResLoaded(): void
        {
            this._equipmentBg.bitmapData = GlobalClass.getBitmapData("equipmentBg_" + this._category + "_" + this._type);
            return;
        }

        public setNormalEquipBg(arg1: int, arg2: int): void
        {
            this._category = arg1;
            this._type = arg2;
            if (this._equipmentBg == null) 
            {
                this._equipmentBg = ObjCreate.createBitmap(ImagesConst.equipmentBg, -3, -3);
                addChildAt(this._equipmentBg, 0);
            }
            return;
        }

        /* internal */ /* var */_equipmentBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_category: int;

        /* internal */ /* var */_type: int;
    }
